package java期末练习.text46;

import java.util.Scanner;

public class Text {

    public static void main(String[] args) {

        Scanner scanner = new Scanner(System.in);

        System.out.print("请输入第一个整数: ");

        int n1 = scanner.nextInt();

        System.out.print("请输入第二个整数: ");

        int n2 = scanner.nextInt();

        int s = n1 + n2;

        int d = n1 - n2;

        System.out.println("两数之和: " + s);

        System.out.println("两数之差: " + d);

        scanner.close();
    }
}